<template>
  <van-cell center :title="title" :label="`${singer} - ${title}`">
    <template #right-icon>
      <van-icon @click="toPlay" name="play-circle-o" size="25" />
    </template>
  </van-cell>
</template>

<script>
export default {
  props: {
    // 歌名
    title: {
      required: true,
      type: String
    },
    // 歌手名
    singer: {
      required: true,
      type: String
    },
    id: {
      required: true
    }
  },
  methods: {
    toPlay () {
      // 跳转到播放页，并且携带id
      this.$router.push({
        name: 'play',
        query: {
          id: this.id
        }
      })
    }
  }
}
</script>

<style></style>
